package com.xls.box2023.adapter;

import android.content.Context;
import android.view.ViewGroup;

import com.lzz.bottomencapsulation.adapter.MvpBaseRecyclerAdapter;
import com.xls.box2023.entity.AppTeamUsersEntity;

import java.util.ArrayList;
import java.util.List;

import androidx.annotation.NonNull;

public class TuiGuang2Adapter extends MvpBaseRecyclerAdapter<TuiGuang2ItemView> {
    ArrayList<AppTeamUsersEntity> list;
    boolean isShowScore=true;
    public TuiGuang2Adapter(Context context, ArrayList<AppTeamUsersEntity> list) {
        super(context);
        this.list=list;
    }

    public TuiGuang2Adapter(Context context, ArrayList<AppTeamUsersEntity> list,boolean isShowScore) {
        super(context);
        this.list=list;
        this.isShowScore=isShowScore;
    }

    @Override
    public void onBindView(@NonNull TuiGuang2ItemView holder, int position) {
        holder.setViewData(list.get(position));
        holder.initView();
    }

    @Override
    public void onBindView(TuiGuang2ItemView holder, int position, List<Object> payloads) {

    }

    @NonNull
    @Override
    public TuiGuang2ItemView onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        return new TuiGuang2ItemView(context,parent,isShowScore);
    }

    @Override
    public int getItemCount() {
        return list.size();
    }
}
